package com.candy.test;

import com.candy.dao.AccountDao;
import com.candy.service.AccountService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Client {
    @Test
    public void test01(){
        ApplicationContext ac=new ClassPathXmlApplicationContext("beans.xml");
        AccountService accountService=(AccountService) ac.getBean("accountService");
        System.out.println(accountService);
        accountService.save();
        System.out.println("==============================================");
        AccountDao accountDao= (AccountDao)ac.getBean("accountDao");
        System.out.println(accountDao);


    }




}
